package com.wbao.dianniu.utils;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.AdapterView;

import java.util.ArrayList;

/**
 * Created by yejianjun on 2018/6/13.
 */

public class MyItemClickListener implements AdapterView.OnItemClickListener {

    private ArrayList<String> url;
    private Context mContext;


    public MyItemClickListener(Context context, ArrayList<String> url) {
        this.url = url;
        this.mContext = context;
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position,
                            long id) {
        // TODO Auto-generated method stub
        //弹出图片查看按钮
        imageBrower(position, url);
    }

    /**
     * 打开图片查看器
     *
     * @param position
     * @param urls2
     */
    protected void imageBrower(int position, ArrayList<String> urls2) {
        Utils.imageBrower(mContext, position, urls2);
    }


}
